<% layout('/layouts/default.html', {title: '企业基本信息管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('企业基本信息管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('own:ownCompanyBasicInformation:edit')){ %>
					<a href="${ctx}/own/ownCompanyBasicInformation/form" class="btn btn-default btnTool" title="${text('新增企业基本信息')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${ownCompanyBasicInformation}" action="${ctx}/own/ownCompanyBasicInformation/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('企业名称')}：</label>
					<div class="control-inline">
						<#form:input path="corpEnName" maxlength="100" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('通信地址')}：</label>
					<div class="control-inline">
						<#form:input path="countryId" maxlength="6" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('通信地址')}：</label>
					<div class="control-inline">
						<#form:input path="provinceId" maxlength="6" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('通信地址')}：</label>
					<div class="control-inline">
						<#form:input path="cityId" maxlength="6" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('注册详细地址')}：</label>
					<div class="control-inline">
						<#form:input path="registerAddress" maxlength="256" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('注册地邮编')}：</label>
					<div class="control-inline">
						<#form:input path="registerPostcode" maxlength="6" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('组织机构代码')}：</label>
					<div class="control-inline">
						<#form:input path="orgcode" maxlength="25" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('GDS厂商识别码')}：</label>
					<div class="control-inline">
						<#form:input path="gdsCode" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('工商营业许可证号')}：</label>
					<div class="control-inline">
						<#form:input path="businessCertificate" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('税务登记证号')}：</label>
					<div class="control-inline">
						<#form:input path="taxCertificate" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('组织机构证书号')}：</label>
					<div class="control-inline">
						<#form:input path="orgCertificate" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('注册日期')}：</label>
					<div class="control-inline">
						<#form:input path="registerDate" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('所属渠道用户ID')}：</label>
					<div class="control-inline">
						<#form:input path="channeluserId" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('办公电话')}：</label>
					<div class="control-inline">
						<#form:input path="remark1" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('传真')}：</label>
					<div class="control-inline">
						<#form:input path="remark2" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('邮箱')}：</label>
					<div class="control-inline">
						<#form:input path="remark3" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('企业类型')}：</label>
					<div class="control-inline width-120">
						<#form:select path="corptype" dictType="own_company_basic_type" blankOption="true" class="form-control"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('企业法人')}：</label>
					<div class="control-inline">
						<#form:input path="master" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('手机')}：</label>
					<div class="control-inline">
						<#form:input path="remark4" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('联系人')}：</label>
					<div class="control-inline">
						<#form:input path="remark5" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('所属区域代码')}：</label>
					<div class="control-inline">
						<#form:input path="areacode" maxlength="6" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('法人身份证号码')}：</label>
					<div class="control-inline">
						<#form:input path="remark6" maxlength="18" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('是否为最下级企业')}：</label>
					<div class="control-inline">
						<#form:input path="remark8" maxlength="1" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('商户所属专业市场代码')}：</label>
					<div class="control-inline">
						<#form:input path="remark9" maxlength="14" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('地理位置经度')}：</label>
					<div class="control-inline">
						<#form:input path="longitude" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('地理位置纬度')}：</label>
					<div class="control-inline">
						<#form:input path="latitude" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('企业CPC编码')}：</label>
					<div class="control-inline">
						<#form:input path="qyzscode" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('更新时间')}：</label>
					<div class="control-inline">
						<#form:input path="updateDate" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('备注')}：</label>
					<div class="control-inline">
						<#form:input path="remarks" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("企业名称")}', name:'corpEnName', index:'a.corp_en_name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/own/ownCompanyBasicInformation/form?id='+row.id+'" class="btnList" data-title="${text("编辑企业基本信息")}">'+(val||row.id)+'</a>';
		}},
		{header:'${text("通信地址")}', name:'countryId', index:'a.country_id', width:150, align:"left"},
		{header:'${text("通信地址")}', name:'provinceId', index:'a.province_id', width:150, align:"left"},
		{header:'${text("通信地址")}', name:'cityId', index:'a.city_id', width:150, align:"left"},
		{header:'${text("注册详细地址")}', name:'registerAddress', index:'a.register_address', width:150, align:"left"},
		{header:'${text("注册地邮编")}', name:'registerPostcode', index:'a.register_postcode', width:150, align:"left"},
		{header:'${text("组织机构代码")}', name:'orgcode', index:'a.orgcode', width:150, align:"left"},
		{header:'${text("GDS厂商识别码")}', name:'gdsCode', index:'a.gds_code', width:150, align:"left"},
		{header:'${text("工商营业许可证号")}', name:'businessCertificate', index:'a.business_certificate', width:150, align:"left"},
		{header:'${text("税务登记证号")}', name:'taxCertificate', index:'a.tax_certificate', width:150, align:"left"},
		{header:'${text("组织机构证书号")}', name:'orgCertificate', index:'a.org_certificate', width:150, align:"left"},
		{header:'${text("注册日期")}', name:'registerDate', index:'a.register_date', width:150, align:"center"},
		{header:'${text("所属渠道用户ID")}', name:'channeluserId', index:'a.channeluser_id', width:150, align:"left"},
		{header:'${text("办公电话")}', name:'remark1', index:'a.remark1', width:150, align:"left"},
		{header:'${text("传真")}', name:'remark2', index:'a.remark2', width:150, align:"left"},
		{header:'${text("邮箱")}', name:'remark3', index:'a.remark3', width:150, align:"left"},
		{header:'${text("企业类型")}', name:'corptype', index:'a.corptype', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('own_company_basic_type')}, val, '${text("未知")}', true);
		}},
		{header:'${text("企业法人")}', name:'master', index:'a.master', width:150, align:"left"},
		{header:'${text("手机")}', name:'remark4', index:'a.remark4', width:150, align:"left"},
		{header:'${text("联系人")}', name:'remark5', index:'a.remark5', width:150, align:"left"},
		{header:'${text("所属区域代码")}', name:'areacode', index:'a.areacode', width:150, align:"left"},
		{header:'${text("法人身份证号码")}', name:'remark6', index:'a.remark6', width:150, align:"left"},
		{header:'${text("是否为最下级企业")}', name:'remark8', index:'a.remark8', width:150, align:"left"},
		{header:'${text("商户所属专业市场代码")}', name:'remark9', index:'a.remark9', width:150, align:"left"},
		{header:'${text("地理位置经度")}', name:'longitude', index:'a.longitude', width:150, align:"right", formatter: function(val, obj, row, act){
			return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		{header:'${text("地理位置纬度")}', name:'latitude', index:'a.latitude', width:150, align:"right", formatter: function(val, obj, row, act){
			return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		{header:'${text("企业CPC编码")}', name:'qyzscode', index:'a.qyzscode', width:150, align:"left"},
		{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
		{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
		{header:'${text("操作")}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('own:ownCompanyBasicInformation:edit')){ %>
				actions.push('<a href="${ctx}/own/ownCompanyBasicInformation/form?id='+row.id+'" class="btnList" title="${text("编辑企业基本信息")}"><i class="fa fa-pencil"></i></a>&nbsp;');
				actions.push('<a href="${ctx}/own/ownCompanyBasicInformation/delete?id='+row.id+'" class="btnList" title="${text("删除企业基本信息")}" data-confirm="${text("确认要删除该企业基本信息吗？")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
			<% } %>
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>